package com.maben.server001;

import javax.jws.WebService;
import javax.xml.ws.Endpoint;

/**
 * 简单webservice服务端
 */
@WebService
public class WeatherInterfaceImpl implements WeatherInterface {

    @Override
    public String queryWeather(String cityName) {
        System.out.println("from client.." + cityName);
        String result = cityName+"晴朗";
        System.out.println("to client..." + result);
        return result;
    }

    public static void main(String[] args) {
        //发送webservice服务
        Endpoint.publish("http://localhost:1234/weather", new WeatherInterfaceImpl());
        System.out.println("发布server001成功");
    }
}
